package com.juhuacha.tryrxjava;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;

import com.juhuacha.tryrxjava.widget.CustomBar;

public class CustomBarAct extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_custom_bar);
        CustomBar bar = (CustomBar) findViewById(R.id.bar);
        bar.setOnTopBarClickListener(new CustomBar.topbarClickListener() {
            @Override
            public void leftClick() {
                Toast.makeText(CustomBarAct.this,"left",Toast.LENGTH_SHORT).show();
            }

            @Override
            public void rightClick() {
                Toast.makeText(CustomBarAct.this,"right",Toast.LENGTH_SHORT).show();
            }
        });
    }
}
